#ifndef WIN32INPUT_H
#define WIN32INPUT_H

#include "Input.h"

#define WIN32_LEAN_AND_MEAN
#include <windows.h>

namespace GenBen {

class Win32Input : public Input
{
public:
	Win32Input();
	virtual ~Win32Input();

	// Keyboard
	virtual bool isKeyPressed(Key key);
	virtual bool isKeyUp(Key key);
	virtual bool isKeyDown(Key key);

	// Mouse
	virtual VectorI getMousePos();
	virtual VectorI getMouseRelativePos();
	virtual int getRelativeWheel();
	virtual bool isMouseButtonPressed(MouseButton button);
	virtual bool isMouseButtonUp(MouseButton button);
	virtual bool isMouseButtonDown(MouseButton button);

	bool process(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
	void update();

private:
	bool keyboard[256];
	bool keyboard_current[256];
	bool keyboard_last[256];

	bool mouse[3];
	bool mouse_current[3];
	bool mouse_last[3];

	VectorI mouse_pos, mouse_pos_old;
};

}

#endif